package com.hntxk.cqzd.home.action;

import com.hntxk.cqzd.common.action.CqzdBaseController;
import com.hntxk.sp.constant.UserConstants;
import com.hntxk.sp.security.configuration.SecurityProperties;
import com.hntxk.sp.util.LoginUserUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.logging.log4j.LogManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

/**
 * 主页controller类
 * 
 * @author a
 * @date 2019年11月4日
 */
@Api(value="产前诊断主页控制器", tags={"[CQZD]产前诊断主页接口"})
@Controller
@RequestMapping("cqzd")
public class CqzdHomeController extends CqzdBaseController {

	private final SecurityProperties securityProperties;

	@Autowired
	public CqzdHomeController(SecurityProperties securityProperties) {
		super(null,LogManager.getLogger(CqzdHomeController.class));
		this.securityProperties = securityProperties;
	}

	/**
	 * 进入产前诊断主页
	 */
	@ApiOperation(value="进入产前诊断主页")
	@GetMapping()
	public String index(){
		return  PAGE_REDIRECT+securityProperties.getLoginSuccessPage();
	}
}
